i'm getting oTable(strValue).search.draw() is not a function.

i'm getting oTable(strValue).search.draw() is not a function.

VishnuHBSVishnuHBS Posts: 20Questions: 2Answers: 0

Hi guys,
I'm using DataTable 1.10.0 version.

i using data table to displayed the user details. but i search the user table from external search button, when i click the button, i got "oTable(strValue).search.draw() is not a function". what can i do now???? pls help me solve this issue guys.

Replies

  • VishnuHBSVishnuHBS Posts: 20Questions: 2Answers: 0
    existingUserTable = $('#existingUserTableId') .dataTable( { "processing" : true, "serverSide" : true, "ajax" : { "url" : "existingUserListByJson.do?role=" + role + "&type=exist", "type" : "POST" }, "jQueryUI" : true, "pagingType" : "full_numbers", "order" : [ 1, 'desc' ], "retrieve" : true, "paging" : true, "columnDefs" : [ { "targets" : 3, "data" : "remove", "render" : function(data, type, row) { return "
    image
    "; } } ] }); function searchUserFilter() { var finalFilter = role + "#" + "exist"; alert(finalFilter); existingUserTable.search(finalFilter).fnDraw(); }

    <button type="button" id="user_search" name="userSearch"
    onclick="searchUserFilter();" class="btn blue">
    Search <i class="m-icon-swapright m-icon-white"></i>
    </button>

  • VishnuHBSVishnuHBS Posts: 20Questions: 2Answers: 0

    i'm using oTable.fnFilter(finalFilter, 0); instead of
    oTable(strValue).search.draw();
    Now it is working well.

  • allanallan Posts: 61,775Questions: 1Answers: 10,112 Site admin

    Second top FAQ :-)

    Allan

This discussion has been closed.